<template>
  <div>
    父组件的值：{{ parentVal }}
    <button @click="busEmit">调用父组件的方法</button>
  </div>
</template>

<script>
export default {
  data() {
    return {
      parentVal:"",
    };
  },
  methods: {
    busEmit() {
      console.log(this.$parent);
      this.parentVal = this.$parent.getParentValue();
    },
  },
};
</script>

<style lang="scss" scoped></style>
